<div id="nav" class="mainnav_title">
    <ul>
        <a class="on" href="{:U('notice')}">公告列表</a> |
        <a href="{:U('notice_add')}">新增公告</a>
    </ul>
</div>
<form action="{:U('notice')}" method="get">
    <table class="search_table" width="100%">
        <tr>
            <td class="search">
                标题: <input id="title" type="text" class="input-text" name="title" value="{$title}"/>

                <input type="submit" value="查询" class="button"/>
            </td>
        </tr>
    </table>
</form>

<form method="post" name="form" action="">
<div class="table-list">
    <table cellspacing="0" cellpadding="0"  width="100%">
            <thead>
                <tr>
                     <th width="62"><a href="javascript:void(0);" onclick="sel_all();">全选</a></th>
                    <th>标题</th>
                     <th>作者</th> 
                    <!--<th>发布时间</th>-->
                    <th>排序</th>
                    <!--<th>起始时间</th>
                    <th>终止时间</th>-->
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
            <volist name="lists" id="vo">
                <tr>
                   <td id="td_sel" align="center"><input type="checkbox" class="sel" id="sel_{$vo.id}" value="{$vo.id}" name="items_{$vo.id}" /></td>
                    <td>{$vo.title}</td>
                     <td>{$vo.author|get_admin_user}</td>
                  <!--  <td>{$vo.create_time|date="Y-m-d H:i:s",###}</td> -->
                    <td>{$vo.sort}</td>
                    <!--<td>{$vo.start_time|f_time=###,"--"}</td>
                    <td>{$vo.end_time|f_time=###,"--"}</td>-->
                    <td>
                        <a href="{:U('notice_edit',array('id'=>$vo['id']))}">编辑</a> &nbsp;|&nbsp;
                        <a href="{:U('notice_del',array('id'=>$vo['id']))}" onClick="return atr_confirm(this.href, '确认要删除吗');">删除</a>
                    </td>
                </tr>
            </volist>            
            </tbody>
        </table>

    <div class="mt30">
    <input type="submit" class="button" name="dosubmit" value="删除" onclick="form.action='{:U('deleteall')}';"/>
       <!--  <a class="black_btn ml10" href="javascript:document.form.submit();" onclick="return atr_confirm(this.href, '确认删除吗');"><input type="submit" class="button" name="dosubmit" value="删除"/></a>-->
        <!--翻页控件-->
        <div class="page_wrap">
            {$page}
        </div>
    </div>
</div>
</form>
<script type="text/javascript">
function sel_all(){
    $('input.sel').each(function(index){
        if($(this).attr('checked')){
            $(this).removeAttr('checked');
        }else{
            $(this).attr('checked', 'checked');
        }
    });
}

</script>